const Ranking = () => {
    return (dispatch) => {
        let url = 'http://www.h5weixin.club:8000/paihang'
        fetch(url, {
            method: 'GET',
            mode: 'cors',
            headers: {
                'Content-Type': 'application/json'
            }
        }).then((res) => {
            return res.json()
        }).then((res) => {
                dispatch({
                    type: 'GET_RANKING_DATA',
                    value: res
                })
            }).catch((err) => {
                console.log(err)
            })
    }
}

export default Ranking;